<?php
session_start();
require_once "include/database.php";
$db = db_connect();
require_once "include/auth.php";
$current_user = current_user();

?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title><?php echo $title; ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <style>
      body {
        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
      }
    </style>
    <link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

  </head>

  <body>

    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="index.php">Sharp Cheddar School</a>
          <div class="nav-collapse collapse">
            <ul class="nav">
              <li class="active"><a href="index.php">Home</a></li>
              <?php if($current_user): ?>
                <!-- If you are administrator, view administrative report -->
                <?php if($current_user["type"] == 2): ?>
                	<li><a href="adminreport.php">View Administrative Report</a></li>
                <?php elseif($current_user["type"] == 1): ?>
	              	<li><a href="faculty_personal_info.php">Personal Information</a></li>
	              	<li><a href="facultyservices.php">Faculty Services</a></li>
              	<?php elseif($current_user["type"] == 0): ?>
	              	<li><a href="personalinformation.php">Personal Information</a></li>
	              	<li><a href="studentservices.php">Student Services</a></li>
              	<?php endif ?>
              	<li><a href="logout.php">Logout</a></li>
              <?php else: ?>
              	<li><a href="signin.php">Login</a></li>
              	<li><a href="createaccount.php">Create Account</a></li>
              <?php endif ?>
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <!-- Javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="bootstrap/js/bootstrap.min.js"></script>